pub fn dp_rec_mc(mut amount: u32) -> u32 {
    const MONEY: [u32; 8] = [1, 2, 5, 10, 20, 30, 50, 100];
    // Find the largest denomination that is less than or equal to the amount
    let Some(idx) = MONEY.iter().rposition(|&x| x <= amount) else {
        return 0;
    };
    // Calculate
    let mut count = 0;
    for m in MONEY[..=idx].iter().rev() {
        if amount > 0 {
            count += amount / m;
            amount %= m;
        } else {
            break;
        }
    }
    count
}
